package com.sdweizan.sdk.bytedance.bean.payment.general;

import com.alibaba.fastjson.annotation.JSONField;
import com.sdweizan.sdk.bytedance.bean.BdBaseResponse;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Data
public class BdGeneralQueryOrderResponse extends BdBaseResponse {

  private PaymentInfo data;

  @NoArgsConstructor
  @Data
  public static class PaymentInfo {
    @JSONField(name = "app_id")
    private String appId;

    @JSONField(name = "order_id")
    private String orderId;

    /** 开发者侧订单号* */
    @JSONField(name = "out_order_no")
    private String outOrderNo;

    /** 订单支付状态 PROCESS： 订单处理中 支付处理中 SUCCESS：成功 支付成功 FAIL：失败 支付失败 暂无该情况会支付失败 TIMEOUT：用户超时未支付* */
    @JSONField(name = "pay_status")
    private String payStatus;

    @JSONField(name = "total_amount")
    private Long totalAmount;

    /** 交易下单时间，精度：毫秒* */
    @JSONField(name = "trade_time")
    private Long tradeTime;

    /** 渠道支付单号，如：微信的支付单号、支付宝支付单号。* */
    @JSONField(name = "channel_pay_id")
    private String channelPayId;

    /** 订单优惠金额，单位：分，接入营销时请关注这个字段* */
    @JSONField(name = "discount_amount")
    private Long discountAmount;

    @JSONField(name = "merchant_uid")
    private String merchantUid;

    /** 支付渠道枚举1：微信2：支付宝10：抖音支付* */
    @JSONField(name = "pay_channel")
    private Integer payChannel;

    /**支付成功时间，**/
    @JSONField(name = "pay_time")
    private Long payTime;

    @JSONField(name = "item_order_list")
    private List<ItemOrder> itemOrderList;
  }

  @NoArgsConstructor
  @Data
  public static class ItemOrder {
    /** 交易系统商品单号* */
    @JSONField(name = "item_order_id")
    private String itemOrderId;

    /** 用户下单时传入的商品sku_id* */
    @JSONField(name = "sku_id")
    private String skuId;

    @JSONField(name = "item_order_amount")
    private Long itemOrderAmount;
  }
}
